﻿using Shake.Business.Infrastructures;

using Shake.Framework.Attributes;
using Shake.Framework.Utility;
using Shake.Framework.View;
using System.Web.Mvc;

namespace Shake.Web.Controllers
{
    [Grant("开发管理")]
    [Theme("LayUiAdmin")]
    public class ConsoleController : Controller
    {
        public IJavascriptBuildService JavascriptBuildService { get; set; }

        [Grant("访问控制台")]
        public ActionResult Index()
        {
            return this.Shake();
        }

        [Grant("生成配置文件")]
        [HttpPost]
        public ActionResult BuildRequireJsConfigFile()
        {
            JavascriptBuildService.BuildRequireJsConfig();
            return this.PostResult(new Framework.Context.PostResult());
        }
    }
}